package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StudentCourseEnrollmentsMapper;
import com.ruoyi.system.domain.StudentCourseEnrollments;
import com.ruoyi.system.service.IStudentCourseEnrollmentsService;

/**
 * 学生课程Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-15
 */
@Service
public class StudentCourseEnrollmentsServiceImpl implements IStudentCourseEnrollmentsService 
{
    @Autowired
    private StudentCourseEnrollmentsMapper studentCourseEnrollmentsMapper;

    /**
     * 查询学生课程
     * 
     * @param enrollmentId 学生课程主键
     * @return 学生课程
     */
    @Override
    public StudentCourseEnrollments selectStudentCourseEnrollmentsByEnrollmentId(Long enrollmentId)
    {
        return studentCourseEnrollmentsMapper.selectStudentCourseEnrollmentsByEnrollmentId(enrollmentId);
    }

    /**
     * 查询学生课程列表
     * 
     * @param studentCourseEnrollments 学生课程
     * @return 学生课程
     */
    @Override
    public List<StudentCourseEnrollments> selectStudentCourseEnrollmentsList(StudentCourseEnrollments studentCourseEnrollments)
    {
        return studentCourseEnrollmentsMapper.selectStudentCourseEnrollmentsList(studentCourseEnrollments);
    }

    /**
     * 新增学生课程
     * 
     * @param studentCourseEnrollments 学生课程
     * @return 结果
     */
    @Override
    public int insertStudentCourseEnrollments(StudentCourseEnrollments studentCourseEnrollments)
    {
        return studentCourseEnrollmentsMapper.insertStudentCourseEnrollments(studentCourseEnrollments);
    }

    /**
     * 修改学生课程
     * 
     * @param studentCourseEnrollments 学生课程
     * @return 结果
     */
    @Override
    public int updateStudentCourseEnrollments(StudentCourseEnrollments studentCourseEnrollments)
    {
        return studentCourseEnrollmentsMapper.updateStudentCourseEnrollments(studentCourseEnrollments);
    }

    /**
     * 批量删除学生课程
     * 
     * @param enrollmentIds 需要删除的学生课程主键
     * @return 结果
     */
    @Override
    public int deleteStudentCourseEnrollmentsByEnrollmentIds(Long[] enrollmentIds)
    {
        return studentCourseEnrollmentsMapper.deleteStudentCourseEnrollmentsByEnrollmentIds(enrollmentIds);
    }

    /**
     * 删除学生课程信息
     * 
     * @param enrollmentId 学生课程主键
     * @return 结果
     */
    @Override
    public int deleteStudentCourseEnrollmentsByEnrollmentId(Long enrollmentId)
    {
        return studentCourseEnrollmentsMapper.deleteStudentCourseEnrollmentsByEnrollmentId(enrollmentId);
    }
}
